import java.util.*;
import java.text.*;

public class test
{
	public static void main(String[] args) throws Exception
	{
		String[] zones = TimeZone.getAvailableIDs();
		List<String> zoneList = Arrays.asList(zones);
		Map<String, List<TimeZone>> tzmap = new HashMap<String, List<TimeZone>>();
		for (String zone : zoneList) {
			TimeZone tz = TimeZone.getTimeZone(zone);
			StringTokenizer toks = new StringTokenizer(zone, "/");
			String prefix = toks.nextToken();
			List<TimeZone> lst = tzmap.get(prefix);
			if (lst == null) {
				lst = new ArrayList<TimeZone>();
				tzmap.put(prefix, lst);
			}
			lst.add(tz);
		}
		List<String> prefixList = new ArrayList<String>();
		for (String prefix : tzmap.keySet()) {
			prefixList.add(prefix);
		}
		Collections.sort(prefixList);
		int i = 1;
		String lastHtml = "";
		for (String prefix : prefixList) {
			//System.out.println("<div id=\"test" + i + "-header\" class=\"accordion_headings\" >" + prefix + "</div>");
			lastHtml += "<div id=\"test" + i + "-content\">";
			lastHtml += "\n";
			lastHtml += "<div class=\"accordion_child\">";
			lastHtml += "\n";
			List<TimeZone> zlst = tzmap.get(prefix);
			Collections.sort(zlst, new TZComparator());
			for (TimeZone z : zlst)
			{
				StringTokenizer toks = new StringTokenizer(z.getID(), "/");
				String name = z.getID();
				if (toks.countTokens() == 2) {
					toks.nextToken();
					name = toks.nextToken();
				}
				
				lastHtml += "<div class=\"tzrow\" onmouseover=\"boxOnHover(this);\" onmouseout=\"boxOffHover(this);\">";
				lastHtml += "<b>" + name + "</b> (" + z.getDisplayName() + ") ";
				lastHtml += print(z);
				lastHtml += "\n";
				lastHtml += "</div>";
				lastHtml += "\n";
			}
			lastHtml += "\n";
			lastHtml += "</div>";
			lastHtml += "\n";
			lastHtml += "</div>";
			lastHtml += "\n";
			i++;
		}
		System.out.println(lastHtml);
		/*
		print("GMT");
		print("Australia/Sydney");
		print("Asia/Singapore");
		*/
	}
	
	public static String print(TimeZone tz) {
		String s= "";
		SimpleDateFormat sdf = new SimpleDateFormat("hh:mm a E");
		Calendar c = Calendar.getInstance();
		c.set(Calendar.HOUR_OF_DAY, 21);
		c.set(Calendar.MINUTE, 30);
		c.set(Calendar.SECOND, 0);
		c.set(Calendar.DATE, 27);
		c.set(Calendar.MONTH, 9);
		c.set(Calendar.YEAR, 2010);

		sdf.setTimeZone(tz);
		s += (sdf.format(c.getTime()));		
		c.roll(Calendar.DATE, 1);
		s += (" and " + sdf.format(c.getTime()));		
		return s;
	}
}